<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SSD1306 OLED display driver: NANO_ENGINE: Nano Engine description</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">SSD1306 OLED display driver
   &#160;<span id="projectnumber">1.8.2</span>
   </div>
   <div id="projectbrief">This library is developed to control SSD1306/SSD1331/SSD1351/IL9163/PCD8554 RGB i2c/spi LED displays</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#define-members">Macros</a>  </div>
  <div class="headertitle">
<div class="title">NANO_ENGINE: Nano Engine description</div>  </div>
</div><!--header-->
<div class="contents">

<p>Nano Engine description.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_adafruit_canvas_ops.html">AdafruitCanvasOps&lt; BPP &gt;</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct___nano_point.html">_NanoPoint</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct___nano_rect.html">_NanoRect</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nano_sprite.html">NanoSprite&lt; T, E &gt;</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nano_engine1__8.html">NanoEngine1_8</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ga851b20d4f9ae55f000ee7058d5f3412a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___n_a_n_o___e_n_g_i_n_e___a_p_i.html#ga851b20d4f9ae55f000ee7058d5f3412a">NanoEngine1</a>&#160;&#160;&#160;<a class="el" href="class_nano_engine.html">NanoEngine</a>&lt;<a class="el" href="tiler_8h.html#a645f33eeb27590c2eaa57938d8ccb091">TILE_16x16_MONO</a>&gt;</td></tr>
<tr class="separator:ga851b20d4f9ae55f000ee7058d5f3412a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3030b7f658c461c80e88876ed8ea0131"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___n_a_n_o___e_n_g_i_n_e___a_p_i.html#ga3030b7f658c461c80e88876ed8ea0131">NanoEngine8</a>&#160;&#160;&#160;<a class="el" href="class_nano_engine.html">NanoEngine</a>&lt;<a class="el" href="tiler_8h.html#a599492648952492afe2b22b6013bf6ff">TILE_16x16_RGB8</a>&gt;</td></tr>
<tr class="separator:ga3030b7f658c461c80e88876ed8ea0131"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac8889599607ff5a2a595ccccd6deaa2f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___n_a_n_o___e_n_g_i_n_e___a_p_i.html#gac8889599607ff5a2a595ccccd6deaa2f">NanoEngine16</a>&#160;&#160;&#160;<a class="el" href="class_nano_engine.html">NanoEngine</a>&lt;<a class="el" href="tiler_8h.html#a5cd7b167cfc7847c931884788689cf44">TILE_8x8_RGB16</a>&gt;</td></tr>
<tr class="separator:gac8889599607ff5a2a595ccccd6deaa2f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga06fc87d81c62e9abb8790b6e5713c55b"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <b>CANVAS_MODE_BASIC</b> = 0x00, 
<a class="el" href="group___n_a_n_o___e_n_g_i_n_e___a_p_i.html#gga06fc87d81c62e9abb8790b6e5713c55ba0f8baf412154ca8af0a985f1eac3853c">CANVAS_TEXT_WRAP</a> = 0x01, 
<a class="el" href="group___n_a_n_o___e_n_g_i_n_e___a_p_i.html#gga06fc87d81c62e9abb8790b6e5713c55ba98772cc8a02f04e00b7503800d2ab9ab">CANVAS_MODE_TRANSPARENT</a> = 0x02, 
<a class="el" href="group___n_a_n_o___e_n_g_i_n_e___a_p_i.html#gga06fc87d81c62e9abb8790b6e5713c55ba2c6c98a4735704fd9e10e68e00a05363">CANVAS_TEXT_WRAP_LOCAL</a> = 0x04
 }</td></tr>
<tr class="separator:ga06fc87d81c62e9abb8790b6e5713c55b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadf764cbdea00d65edcd07bb9953ad2b7"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <a class="el" href="group___n_a_n_o___e_n_g_i_n_e___a_p_i.html#gadf764cbdea00d65edcd07bb9953ad2b7af77fb67151d0c18d397069ad8c271ba3">BLACK</a> = 0x00, 
<a class="el" href="group___n_a_n_o___e_n_g_i_n_e___a_p_i.html#gadf764cbdea00d65edcd07bb9953ad2b7a283fc479650da98250635b9c3c0e7e50">WHITE</a> = 0xFF
 }</td></tr>
<tr class="separator:gadf764cbdea00d65edcd07bb9953ad2b7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaff4934f12cf7a86959c46e57aac5ae5d"><td class="memItemLeft" align="right" valign="top">typedef uint8_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___n_a_n_o___e_n_g_i_n_e___a_p_i.html#gaff4934f12cf7a86959c46e57aac5ae5d">TNanoEngineGetButtons</a>) (void)</td></tr>
<tr class="separator:gaff4934f12cf7a86959c46e57aac5ae5d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6bed080ec75d21960ecff045b5b110ff"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="struct___nano_point.html">_NanoPoint</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___n_a_n_o___e_n_g_i_n_e___a_p_i.html#ga6bed080ec75d21960ecff045b5b110ff">NanoPoint</a></td></tr>
<tr class="separator:ga6bed080ec75d21960ecff045b5b110ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4a82780f66e02834d957e77e70cc17d7"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="struct___nano_rect.html">_NanoRect</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___n_a_n_o___e_n_g_i_n_e___a_p_i.html#ga4a82780f66e02834d957e77e70cc17d7">NanoRect</a></td></tr>
<tr class="separator:ga4a82780f66e02834d957e77e70cc17d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga42f0bf9faab34f849a7b9de151ccf456"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_s_fixed_font_info.html">SFixedFontInfo</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___n_a_n_o___e_n_g_i_n_e___a_p_i.html#ga42f0bf9faab34f849a7b9de151ccf456">s_fixedFont</a></td></tr>
<tr class="separator:ga42f0bf9faab34f849a7b9de151ccf456"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>Nano Engine description. </p>
<p>This group contains API functions for developing Graphics engines. </p>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="ga851b20d4f9ae55f000ee7058d5f3412a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga851b20d4f9ae55f000ee7058d5f3412a">&#9670;&nbsp;</a></span>NanoEngine1</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define NanoEngine1&#160;&#160;&#160;<a class="el" href="class_nano_engine.html">NanoEngine</a>&lt;<a class="el" href="tiler_8h.html#a645f33eeb27590c2eaa57938d8ccb091">TILE_16x16_MONO</a>&gt;</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>NanoEngine1 is simple graphics engine, that implements double buffering work for the systems with very low resources. That is, memory buffer for SSD1306 oled display needs at least 128x64/8 bytes (1024 bytes), and this is inacceptable for microcontrollers like attiny85 (it has only 512B of RAM). So, to workaround issue with low resources, NanoEngine1 uses small tile buffer (NE_TILE_SIZE x NE_TILE_SIZE) and updates only part of oled screen at once. It makes system slow, but it is possible to run NanoEngine1 on simple controllers. If tile size is 32x32, then 128x64 oled display is devided into 8 tiles: <br />
 [0,0] [1,0] [2,0], [3,0] <br />
 [0,1] [1,1] [2,1], [3,1] <br />
 In your application you can choose, if you want to refresh whole screen (refresh()), or you need to refresh only part of oled display.</p>
<dl class="section warning"><dt>Warning</dt><dd>Works only in SSD1306 compatible mode </dd></dl>

<p class="definition">Definition at line <a class="el" href="nano__engine_8h_source.html#l00065">65</a> of file <a class="el" href="nano__engine_8h_source.html">nano_engine.h</a>.</p>

</div>
</div>
<a id="gac8889599607ff5a2a595ccccd6deaa2f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac8889599607ff5a2a595ccccd6deaa2f">&#9670;&nbsp;</a></span>NanoEngine16</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define NanoEngine16&#160;&#160;&#160;<a class="el" href="class_nano_engine.html">NanoEngine</a>&lt;<a class="el" href="tiler_8h.html#a5cd7b167cfc7847c931884788689cf44">TILE_8x8_RGB16</a>&gt;</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>NanoEngine16 is simple graphics engine, that implements double buffering work for the systems with very low resources. That is, memory buffer for SSD1351 oled display needs at least 128x128x2 bytes (32768 bytes), and this is inacceptable for microcontrollers like atmega328p (it has only 2KiB of RAM). So, to workaround issue with low resources, NanoEngine16 uses small tile buffer (NE_TILE_SIZE x NE_TILE_SIZE) and updates only part of oled screen at once. It makes system slow, but it is possible to run NanoEngine16 on simple controllers. If tile size is 16x16, then 128x128 oled display is devided into 64 tiles: <br />
 [0,0] [1,0] [2,0] [3,0] [4,0] [5,0] [6,0] [7,0] <br />
 [0,1] [1,1] [2,1] [3,1] [4,1] [5,1] [6,1] [7,1] <br />
 etc. <br />
 In your application you can choose, if you want to refresh whole screen (refresh()), or you need to refresh only part of oled display. </p>

<p class="definition">Definition at line <a class="el" href="nano__engine_8h_source.html#l00127">127</a> of file <a class="el" href="nano__engine_8h_source.html">nano_engine.h</a>.</p>

</div>
</div>
<a id="ga3030b7f658c461c80e88876ed8ea0131"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3030b7f658c461c80e88876ed8ea0131">&#9670;&nbsp;</a></span>NanoEngine8</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define NanoEngine8&#160;&#160;&#160;<a class="el" href="class_nano_engine.html">NanoEngine</a>&lt;<a class="el" href="tiler_8h.html#a599492648952492afe2b22b6013bf6ff">TILE_16x16_RGB8</a>&gt;</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>NanoEngine8 is simple graphics engine, that implements double buffering work for the systems with very low resources. That is, memory buffer for SSD1331 oled display needs at least 96x64x1 bytes (6144 bytes), and this is inacceptable for microcontrollers like atmega328p (it has only 2KiB of RAM). So, to workaround issue with low resources, NanoEngine8 uses small tile buffer (NE_TILE_SIZE x NE_TILE_SIZE) and updates only part of oled screen at once. It makes system slow, but it is possible to run NanoEngine8 on simple controllers. If tile size is 32x32, then 96x64 oled display is devided into 6 tiles: <br />
 [0,0] [1,0] [2,0] <br />
 [0,1] [1,1] [2,1] <br />
 In your application you can choose, if you want to refresh whole screen (refresh()), or you need to refresh only part of oled display. </p>

<p class="definition">Definition at line <a class="el" href="nano__engine_8h_source.html#l00085">85</a> of file <a class="el" href="nano__engine_8h_source.html">nano_engine.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Typedef Documentation</h2>
<a id="ga6bed080ec75d21960ecff045b5b110ff"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga6bed080ec75d21960ecff045b5b110ff">&#9670;&nbsp;</a></span>NanoPoint</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="struct___nano_point.html">_NanoPoint</a>  <a class="el" href="group___n_a_n_o___e_n_g_i_n_e___a_p_i.html#ga6bed080ec75d21960ecff045b5b110ff">NanoPoint</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Describes point </p>

</div>
</div>
<a id="ga4a82780f66e02834d957e77e70cc17d7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga4a82780f66e02834d957e77e70cc17d7">&#9670;&nbsp;</a></span>NanoRect</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="struct___nano_rect.html">_NanoRect</a>  <a class="el" href="group___n_a_n_o___e_n_g_i_n_e___a_p_i.html#ga4a82780f66e02834d957e77e70cc17d7">NanoRect</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>NanoRect structure describes rectangle area. </p>

</div>
</div>
<a id="gaff4934f12cf7a86959c46e57aac5ae5d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaff4934f12cf7a86959c46e57aac5ae5d">&#9670;&nbsp;</a></span>TNanoEngineGetButtons</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef uint8_t(* TNanoEngineGetButtons) (void)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Type of user-specified keyboard callback </p>

<p class="definition">Definition at line <a class="el" href="core_8h_source.html#l00041">41</a> of file <a class="el" href="core_8h_source.html">core.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a id="ga06fc87d81c62e9abb8790b6e5713c55b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga06fc87d81c62e9abb8790b6e5713c55b">&#9670;&nbsp;</a></span>anonymous enum</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">anonymous enum</td>
        </tr>
      </table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga06fc87d81c62e9abb8790b6e5713c55ba0f8baf412154ca8af0a985f1eac3853c"></a>CANVAS_TEXT_WRAP&#160;</td><td class="fielddoc"><p>If the flag is specified, text cursor is moved to new line when end of screen is reached </p>
</td></tr>
<tr><td class="fieldname"><a id="gga06fc87d81c62e9abb8790b6e5713c55ba98772cc8a02f04e00b7503800d2ab9ab"></a>CANVAS_MODE_TRANSPARENT&#160;</td><td class="fielddoc"><p>This flag make bitmaps transparent (Black color) </p>
</td></tr>
<tr><td class="fieldname"><a id="gga06fc87d81c62e9abb8790b6e5713c55ba2c6c98a4735704fd9e10e68e00a05363"></a>CANVAS_TEXT_WRAP_LOCAL&#160;</td><td class="fielddoc"><p>If the flag is specified, text cursor is moved to new line when end of canvas is reached </p>
</td></tr>
</table>

<p class="definition">Definition at line <a class="el" href="canvas_8h_source.html#l00043">43</a> of file <a class="el" href="canvas_8h_source.html">canvas.h</a>.</p>

</div>
</div>
<a id="gadf764cbdea00d65edcd07bb9953ad2b7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gadf764cbdea00d65edcd07bb9953ad2b7">&#9670;&nbsp;</a></span>anonymous enum</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">anonymous enum</td>
        </tr>
      </table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gadf764cbdea00d65edcd07bb9953ad2b7af77fb67151d0c18d397069ad8c271ba3"></a>BLACK&#160;</td><td class="fielddoc"><p>Black color. </p>
</td></tr>
<tr><td class="fieldname"><a id="gadf764cbdea00d65edcd07bb9953ad2b7a283fc479650da98250635b9c3c0e7e50"></a>WHITE&#160;</td><td class="fielddoc"><p>White color. </p>
</td></tr>
</table>

<p class="definition">Definition at line <a class="el" href="canvas_8h_source.html#l00368">368</a> of file <a class="el" href="canvas_8h_source.html">canvas.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a id="ga42f0bf9faab34f849a7b9de151ccf456"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga42f0bf9faab34f849a7b9de151ccf456">&#9670;&nbsp;</a></span>s_fixedFont</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="struct_s_fixed_font_info.html">SFixedFontInfo</a> s_fixedFont</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Structure, holding currently set font. </p><dl class="section warning"><dt>Warning</dt><dd>Only for internal use. </dd></dl>

<p class="definition">Definition at line <a class="el" href="tiler_8h_source.html#l00044">44</a> of file <a class="el" href="tiler_8h_source.html">tiler.h</a>.</p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
